package com.dragon.flow.model.org;


import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Comment:部门
 * @author bruce.liu
 * @Create Date 2021年3月11日
 * 说明： 2022年5月11日修改为sysDept相关字段。
 */
@Data
@EqualsAndHashCode(callSuper = true)
//@TableName(value = "tbl_org_department")
@TableName(value = "sys_dept")
public class Department extends Model implements Serializable{
	private static final long serialVersionUID = 5881655109164147308L;

	@TableId(value = "dept_id", type = IdType.AUTO)
	@ApiModelProperty(value = "部门id")
	private Integer id;

	@ApiModelProperty(value = "租户ID")
	private Integer tenantId;

	@ApiModelProperty(value = "部门名称")
	private String name;

	@ApiModelProperty(value = "部门全名称")
	private String fullName;
	@ApiModelProperty(value = "部门全编码")
	private String fullCode;

	@ApiModelProperty(value = "排序值")
	private Integer sort;

	@JsonFormat(timezone = "GMT+8",pattern="yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "创建时间")
	private Date createTime;

	@JsonFormat(timezone = "GMT+8",pattern="yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "修改时间")
	private Date updateTime;

	@ApiModelProperty(value = "父级部门id")
	private Integer parentId;

	@TableLogic
	@ApiModelProperty(value = "删除标记,1:已删除,0:正常")
	private String delFlag;

	@ApiModelProperty(value = "部门编码")
	private String code;
	@ApiModelProperty(value = "公司ID")
	private String companyId;

	@ApiModelProperty(value = "类型")
	private String type;
	@ApiModelProperty(value = "拼音")
	private String pinyin;

	@ApiModelProperty(value = "状态")
	private Integer status;

	/** 备注 80 */
	private String note;

	//部门领导
	private String leaderCode;
	/** 父亲code*/
	@TableField(exist = false)
	private String pcode;
	/** 公司的code */
	@TableField(exist = false)
	private String companyCode;
	//部门领导
	@TableField(exist = false)
	private String leaderName;
	/**
	 * 查询条件 - 【临时属性】
	 */
	@TableField(exist = false)
	private List<String> companyIds;

	@TableField(exist = false)
	private String companyName;

	@TableField(exist = false)
	private String keyword;

}
